<template>
	<view class="">
		<m-block gap="30 20" class="class-card">
			<m-block v-for="(item,index) in listArr" class="flex-column ai-center ptb-16 ta-center" @click="goPage(item)">
				<m-image :size="[64,64]" :src="item.icon"></m-image>
				<text class="fs26 mt-12">{{item.name}}</text>
			</m-block>
		</m-block>
		<!-- <m-block gap="40 0">
			<m-block class="menu-box" gap="0 10 40">
				<view class="dl" @click="Jump('/pages/home/copartner/copartner')">
					<view class="dt">
						<m-image :size="[86,86]" src="../../static/images/pages/home/hhr.png"></m-image>
					</view>
					<view class="dd flex-column">
						<text class="fs34">合伙人</text>
						<text class="fs21 text-grey">享更多权益</text>
					</view>
				</view>
				<view class="dl" @click="Jump('/pages/home/reward-center/reward-center')" >
					<view class="dt">
						<m-image :size="[86,86]" src="../../static/images/pages/home/jlzx.png"></m-image>
					</view>
					<view class="dd flex-column">
						<text class="fs34">奖励中心</text>
						<text class="fs21 text-grey">查看奖励</text>
					</view>
				</view>
				<view class="dl" @click="openURL()">
					<view class="dt">
						<m-image :size="[86,86]" src="../../static/images/pages/home/czzx.png"></m-image>
					</view>
					<view class="dd flex-column">
						<text class="fs34">充值中心</text>
						<text class="fs21 text-grey">充值话费</text>
					</view>
				</view>
			</m-block>
			<m-block class="menu-box menu-box2" gap="0 10 0">
				<view class="dl" @click="openURL()">
					<view class="dt">
						<m-image :size="[80,80]" src="../../static/images/pages/home/zxkf.png"></m-image>
					</view>
					<view class="dd flex-column">
						<text class="fs28">联系客服</text>
						<text class="fs21 text-grey">为你答疑</text>
					</view>
				</view>
				<view class="dl" @click="openURL()">
					<view class="dt">
						<m-image :size="[80,80]" src="../../static/images/pages/home/zsjm.png"></m-image>
					</view>
					<view class="dd flex-column">
						<text class="fs28">招商加盟</text>
						<text class="fs21 text-grey">邀请商家</text>
					</view>
				</view>
				<view class="dl" @click="openURL()">
					<view class="dt">
						<m-image :size="[80,80]" src="../../static/images/pages/home/gwq.png"></m-image>
					</view>
					<view class="dd flex-column">
						<text class="fs28">购物券</text>
						<text class="fs21 text-grey">更多优惠</text>
					</view>
				</view>
				<view class="dl" @click="Jump('/pages/mine/aboutUs/aboutUs')">
					<view class="dt">
						<m-image :size="[84,84]" src="../../static/images/pages/home/gywm.png"></m-image>
					</view>
					<view class="dd flex-column">
						<text class="fs28">关于我们</text>
						<text class="fs21 text-grey">了解更多</text>
					</view>
				</view>
			</m-block>
		</m-block> -->
	</view>
</template>

<script>
	import { mapState, mapActions } from 'vuex';
	export default {
		name: 'fun',
		data() {
			return {};
		},
		computed: {
			...mapState({
				userinfo: state => state.user.userinfo,
			}),
			listArr() {
				return [{
					icon: require('@/static/images/pages/index/fun01.png'),
					name: '数据看板[打印机]',
					url: '/pages/index/dataList/dataList',
				},{
					icon: require('@/static/images/pages/index/fun01.png'),
					name: '数据看板[AI美食机]',
					url: '/pages/index/dataListW3/dataList',
				} ]
			}
		},
		methods: {
			goPage(item) {
				if (!item.url) return this.Toast('即将上线');
				this.Jump({
					url: item.url,
					params: item.params,
				})
			}
		},

	}
</script>

<style lang="scss">
	.class-card {
		display: grid;
		grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
		grid-gap: 10rpx;
	}
</style>